package com.gxjc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.gxjc.dao.bean.PowerDao;
import com.gxjc.model.Power;
@Transactional
public class PowerService {
	@Autowired
	PowerDao powerDao;
	public List<Power> getAll(){
		return powerDao.getAll();	
	}
	
	public void save(Power power) {
		powerDao.save(power);
	}
	
	public void delete(int id) {
		powerDao.delete(id);
	}
	
	public Power getPowerById(int id) {
		return (Power)powerDao.getPowerById(id);
	}
	public List<Power> getPowerBySql(String sql) {
		return powerDao.getPowerBySql(sql);
	}
	public void update(Power power) {
		powerDao.update(power);
	}
	//get and set

	public PowerDao getPowerDao() {
		return powerDao;
	}

	public void setPowerDao(PowerDao powerDao) {
		this.powerDao = powerDao;
	}
	
	
}
